VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "clsIsRecordsetEmpty"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit
'*---------------------------------------------------------------------
'* Method:       IsEmpty
'* Description:  Determine if a specified ADODB Recordset is empty
'* Parameters:   rs - The recordset to enquire upon
'* Returns:      Boolean - TRUE if the recordset is empty,
'*                         FALSE otherwise
'* Comments:
'*---------------------------------------------------------------------
Public Function IsEmpty(ByRef rs As ADODB.Recordset) As Boolean
  Dim bResult As Boolean
  
  ' If the recordset has not been assigned then it's as good as empty
  If rs Is Nothing Then
    bResult = True
  Else
    ' Otherwise check if there are any records at all contained therein
    bResult = ((rs.BOF) And (rs.EOF))
  End If
  
  IsEmpty = bResult
End Function ' IsEmpty




